package co.yixiang.modules.product.service.dto;

import lombok.Getter;
import lombok.Setter;

/**
 * @ClassName 产品结果DTO
 * @Author hupeng <610796224@qq.com>
 * @Date 2020/4/24
 **/
@Getter
@Setter
public class ProductResultDto {
    private Double minPrice;

    private Double minOtPrice;

    private Double minCost;

    private Integer stock;

    private Integer minIntegral;

    ProductResultDto(Double minPrice, Double minOtPrice, Double minCost, Integer stock, Integer minIntegral) {
        this.minPrice = minPrice;
        this.minOtPrice = minOtPrice;
        this.minCost = minCost;
        this.stock = stock;
        this.minIntegral = minIntegral;
    }

    public static ProductResultDtoBuilder builder() {
        return new ProductResultDtoBuilder();
    }

    public static class ProductResultDtoBuilder {
        private Double minPrice;
        private Double minOtPrice;
        private Double minCost;
        private Integer stock;
        private Integer minIntegral;

        ProductResultDtoBuilder() {
        }

        public ProductResultDtoBuilder minPrice(Double minPrice) {
            this.minPrice = minPrice;
            return this;
        }

        public ProductResultDtoBuilder minOtPrice(Double minOtPrice) {
            this.minOtPrice = minOtPrice;
            return this;
        }

        public ProductResultDtoBuilder minCost(Double minCost) {
            this.minCost = minCost;
            return this;
        }

        public ProductResultDtoBuilder stock(Integer stock) {
            this.stock = stock;
            return this;
        }

        public ProductResultDtoBuilder minIntegral(Integer minIntegral) {
            this.minIntegral = minIntegral;
            return this;
        }

        public ProductResultDto build() {
            return new ProductResultDto(minPrice, minOtPrice, minCost, stock, minIntegral);
        }

        public String toString() {
            return "ProductResultDto.ProductResultDtoBuilder(minPrice=" + this.minPrice + ", minOtPrice=" + this.minOtPrice + ", minCost=" + this.minCost + ", stock=" + this.stock + ", minIntegral=" + this.minIntegral + ")";
        }
    }
}
